import request from '@/utils/request'

// 获取课程基本信息
export const getCourseInfo = params => {
  return request({
    method: 'GET',
    url: 'course/getCourseInfo',
    params
  })
}
// 获取课程章节
export const getCourseChapter = params => {
  return request({
    method: 'GET',
    url: 'course/getCourseChapter',
    params
  })
}
// 获取课程评论
export const getCourseComment = params => {
  return request({
    method: 'GET',
    url: '/course/getCourseComment',
    params
  })
}

// 发布课程评论
export const toCommentCourse = data => {
  return request({
    method: 'POST',
    url: '/course/addCourseComment',
    data
  })
}

// 获取章节视频
export const getVedioById = params => {
  return request({
    method: 'GET',
    url: '/course/getVedioById',
    params
  })
}

// 获取视频评论
export const getVideoComment = params => {
  return request({
    method: 'GET',
    url: '/course/getSectionComment',
    params
  })
}

// 发布视频评论
export const toCommentVideo = data => {
  return request({
    method: 'POST',
    url: '/course/toCommentSection',
    data
  })
}



// 获取推荐课程列表
export const getRecommendList = params => {
  return request({
    method: 'GET',
    url: '/course/getRecommendList',
    params
  })
}

